#include "sensor.hpp"
#include <iostream>

namespace my_cpp_project
{
    Sensor::Sensor(int id, int sensor_type)
    {
        this->m_id = id;
        this->m_sensor_type = sensor_type;
    }

    Sensor::~Sensor() = default;
    void Sensor::print_basic_info()
    {
        std::cout << "sensor id is " << this->m_id << std::endl;
        std::cout << "sensor type id is" << this->m_sensor_type << std::endl;
        std::cout << "sensor type is" << Sensor::TYPEMAP.find(this->m_sensor_type)->second << std::endl;
    }

    const std::map<int, std::string> Sensor::TYPEMAP = {
        {1, "discrete_sensor"},
        {2, "threshold_sensor"}};

    int Sensor::get_id()
    {
        return this->m_id;
    }
    int Sensor::get_sensor_type()
    {
        return this->m_sensor_type;
    }

}
